{if $smarty.get.sortby}
	{ext->save_sortby parent=$data.page.id sortby=$smarty.get.sortby}
	{assign var="sortby" value=$smarty.get.sortby}
{else}
	{ext->get_sortby parent=$data.page.id assign="sortby"}
{/if}
<table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid silver; background-color:#fefefe;">
	<tr>
		<td style="padding:0px 0px 0px 10px;" width="33" align="center" height="20"><a onClick="openCenteredOnOpenerWindow('index.php?admin=1&id={$smarty.get.id}&element_type={$smarty.get.element_type}&popup=4{if $smarty.get.element_list_page_nr}&element_list_page_nr={$smarty.get.element_list_page_nr}{/if}','element_new',400,300,1,0); return false" href="#"><img src="_tvs_system_core_/design/img/icon_new_doc.gif"></a></td>
		<td style="padding:0px 10px; border-right:1px solid silver"><nobr><a onClick="openCenteredOnOpenerWindow('index.php?admin=1&id={$smarty.get.id}&element_type={$smarty.get.element_type}&popup=4{if $smarty.get.element_list_page_nr}&element_list_page_nr={$smarty.get.element_list_page_nr}{/if}','element_new',400,300,1,0); return false" href="#">{t t="Sukurti naują elementą"}</a></nobr></td>
		<td style="padding:0px 0px 0px 10px;" width="33" align="center"><img src="_tvs_system_core_/design/img/admin/_icon_delete.gif"></td>
		<td style="padding:0px 10px; border-right:1px solid silver"><nobr><a href="#" onClick="if (confirm('{t t='confirm_delete_many'}')) document['forms']['element_list'].submit()" target="_self"><nobr>{t t='Trinti pažymėtus elementus'}</a></nobr></td>
		<td style="padding:0px 0px 0px 10px;" width="33" align="center" height="20"><a onClick="openCenteredOnOpenerWindow('index.php?admin=1&id={$smarty.get.id}&popup=75{if $smarty.get.element_list_page_nr}&element_list_page_nr={$smarty.get.element_list_page_nr}{/if}','element_new',400,450,1,0); return false" href="#"><img src="_tvs_system_core_/design/img/admin/_icon_copy.gif"></a></td>
		<td style="padding:0px 10px; border-right:1px solid silver"><nobr><a onClick="openCenteredOnOpenerWindow('index.php?admin=1&id={$smarty.get.id}&popup=75{if $smarty.get.element_list_page_nr}&element_list_page_nr={$smarty.get.element_list_page_nr}{/if}','element_new',400,450,1,1); return false" href="#">{t t="Kopijuoti pažymėtus elementus"}</a></nobr></td>
		<!-- *  -->
		<td width="100%" style="padding:0px 10px;border-right:1px solid silver;">
		{if $data.page.type=="images_galery01"}
		{t t='Rūšiuoti pagal'}:
		{if $sortby=="-id" || $sortby=="+id" || !$sortby}
		{if !$sortby || $sortby[0]=="-"}<img src="_tvs_system_core_/design/img/admin/pos_down.gif" alt="" />{else $sortby[0]=="+"}<img src="_tvs_system_core_/design/img/admin/pos_up.gif" alt="" />{/if}
    {/if}
    <a{if $sortby=="-id" || $sortby=="+id" || !$sortby} style="color: #b1bfc7;"{/if}  href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={$smarty.get.element_list_page_nr}&amp;sortby={if !$sortby || $sortby=="-id"}%2Bid{else}-id{/if}">{t t='datą'}</a>&nbsp;
    {if $sortby=="-name" || $sortby=="+name"}
		{if !$sortby || $sortby[0]=="-"}<img src="_tvs_system_core_/design/img/admin/pos_down.gif" alt="" />{else $sortby[0]=="+"}<img src="_tvs_system_core_/design/img/admin/pos_up.gif" alt="" />{/if}
    {/if}
    <a{if $sortby=="-name" || $sortby=="+name"} style="color: #b1bfc7;"{/if} href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={$smarty.get.element_list_page_nr}&amp;sortby={if $sortby=="-name"}%2Bname{else}-name{/if}">{t t='pavadinimą'}</a>&nbsp;
    {if $sortby=="-pos" || $sortby=="+pos"}
		{if !$sortby || $sortby[0]=="-"}<img src="_tvs_system_core_/design/img/admin/pos_down.gif" alt="" />{else $sortby[0]=="+"}<img src="_tvs_system_core_/design/img/admin/pos_up.gif" alt="" />{/if}
    {/if}
    <a{if $sortby=="-pos" || $sortby=="+pos"} style="color: #b1bfc7;"{/if} href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={$smarty.get.element_list_page_nr}&amp;sortby={if $sortby=="-pos"}%2Bpos{else}-pos{/if}">{t t='poziciją'}</a>
    {else}
    &nbsp;
    {/if}
    </td>
		<td style="padding:0px 10px;">
    <nobr>
		{if $page_data.totalpages>1}
    {assign var="PAGES" value="5"}
    <p align="right">
    		{if $smarty.get.element_list_page_nr>1}<a href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={$smarty.get.element_list_page_nr-1}{if $sortby}&amp;sortby={$sortby}{/if}" style="padding-right: 10px;"><font style="color: #cc0e00;">«</font> {t t='Buvęs'}</a>{/if}
    		{foreach from=$page_data.pages item="el"}
    		{if ($el.number>=$smarty.get.element_list_page_nr-$PAGES/2 && $el.number<$smarty.get.element_list_page_nr+$PAGES/2 && $smarty.get.element_list_page_nr>$PAGES/2 && $page_data.totalpages>=$smarty.get.element_list_page_nr+$PAGES/2) || ($el.number>=$page_data.totalpages-$PAGES+1 && $smarty.get.element_list_page_nr>$PAGES/2 && $page_data.totalpages<=$smarty.get.element_list_page_nr+$PAGES/2) || ($smarty.get.element_list_page_nr<=$PAGES/2 && $el.number<=$PAGES)}
        {if $el.number>1} <font style="color: #c0c0c0;">-</font> {/if}
        	{if (!$smarty.get.element_list_page_nr && $el.number==1) || ($el.number==$smarty.get.element_list_page_nr && $smarty.get.element_list_page_nr)}
    				<b style="color: #c0c0c0;">{$el.number}</b>
    			{else}
    				<a href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={$el.number}{if $sortby}&amp;sortby={$sortby}{/if}">{$el.number}</a>
    			{/if}
        {/if}
    		{/foreach}
    		{if $smarty.get.element_list_page_nr<$page_data.totalpages}<a href="index.php?admin=1&amp;tpl_action={$smarty.get.tpl_action}&amp;id={$smarty.get.id}&amp;element_list_page_nr={if !$smarty.get.element_list_page_nr}2{else}{$smarty.get.element_list_page_nr+1}{/if}{if $sortby}&amp;sortby={$sortby}{/if}" style="padding-left: 10px;">{t t='Sekantis'} <font style="color: #cc0e00;">»</font></a>{/if}
    </p>
    {else}
    &nbsp;
    {/if}
		</nobr>
		</td>
		<!-- /*  -->
	</tr>
</table>
